﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PSE.Framework.ErrorLogging;
using PSE.Framework.Configuration;
using PSE.Framework.Process;

namespace PSE.Updater.Application
{
    class Program : BaseProgram
    {
        static Program()
        {
            Initialize(PSE.Framework.Configuration.Components.SystemComponents.System, PSE.Framework.Configuration.Components.SystemComponents.UpdaterClient);
        }

        [STAThread]
        static void Main(string[] args)
        {
            System.Threading.Thread.Sleep(7.SecondsToMilliseconds());

            UpdaterApplication application = null;

            try
            {
                application = new UpdaterApplication();
                application.Run();
            }
            catch (Exception ex)
            {
                HandleException(ex);
            }
            finally
            {
                if (application != null)
                    application.Shutdown();
            }
        }
    }
}
